<template>
  <div id="app">
    <common-header></common-header>
    <router-view v-wechat-title="$route.meta.title" v-if="isRouterAlive"></router-view>
    <common-footer></common-footer>
  </div>
</template>

<script>
import CommonHeader from 'common/header/Header';
import CommonFooter from 'common/footer/Footer.vue';
export default {
  name: 'App',
  provide () {
    return {
      reload: this.reload
    }
  },
  data () {
    return {
      isRouterAlive: true
    }
  },
  components: {
    CommonHeader,
    CommonFooter
  },
  methods: {
    reload () {
      this.isRouterAlive = false
      this.$nextTick(function(){
        this.isRouterAlive = true
      })
    }
  }
}
</script>

<style lang="stylus">
</style>
